//
//  BRToolsView.h
//  BrezzeSaaS
//
//  Created by IOS on 2021/9/23.
//  Copyright © 2021 Brezze GWG. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <QMUIKit/QMUIKit.h>
#import "BRConfigs.h"

NS_ASSUME_NONNULL_BEGIN

@interface BRToolsView : NSObject

+ (UIView *)getLineView;

+ (UIView *)getLineView:(UIColor *)color;

/// 卡片视图 默认13r 白色
+ (UIView *)br_contentView;
+ (UIView *)br_contentViewRadius:(CGFloat)r;
+ (UIView *)br_contentView:(UIColor *)color cornerRadius:(CGFloat)r;

+ (QMUIButton *)br_fillBtn:(NSString *)title font:(UIFont *)font;
+ (QMUIButton *)br_fillBtn:(NSString *)title font:(UIFont *)font titleColor:(UIColor *)titleColor;
+ (QMUIButton *)br_fillBtn:(NSString *)title font:(UIFont *)font titleColor:(UIColor *)titleColor bgImg:(UIImage *)bgImg;

+ (void)br_addShadow:(UIView *)view radius:(CGFloat)radius shadowColor:(UIColor *)color;

/// 快速创建 UIImageView
+ (UIImageView *)br_imgViewCornerR:(CGFloat)r;
+ (UIImageView *)br_imgView:(NSString *)defaultImg cornerR:(CGFloat)r;

+ (QMUILabel *)br_label:(NSString *)text textColor:(UIColor *)textColor font:(UIFont *)font;
+ (QMUILabel *)br_label:(NSString *)text textColor:(UIColor *)textColor font:(UIFont *)font textAlignment:(NSTextAlignment)alignment;


+ (QMUIButton *)br_btnDefault:(NSString *)text bgColor:(UIColor *)bgC radius:(CGFloat)r;
+ (QMUIButton *)br_btn:(NSString *)text textColor:(UIColor *)textColor font:(UIFont *)font;
/// 一般紫色底 按钮
+ (QMUIButton *)br_btnDefault:(NSString *)text;
/// 蓝色圆角背景Btn，高52
+ (QMUIButton *)br_btnBGImg:(NSString *)text;
/// 一般紫色边框 白底 按钮
+ (QMUIButton *)br_btnborder:(NSString *)text;
+ (QMUIButton *)br_btnborder:(NSString *)text radius:(CGFloat)radius;
+ (QMUIButton *)br_btnborder:(NSString *)text radius:(CGFloat)radius font:(UIFont *)font;
/// 虚线处理
+ (CAShapeLayer *)br_separatorDashLayerWithLineLength:(NSInteger)lineLength
                                            lineSpacing:(NSInteger)lineSpacing
                                              lineWidth:(CGFloat)lineWidth
                                              lineColor:(CGColorRef)lineColor
                                         isHorizontal:(BOOL)isHorizontal frame:(CGRect)frame;

+ (CAShapeLayer *)br_corners:(CGFloat)cornerSize corners:(UIRectCorner)corners by:(UIView *)view;

/// 快速添加网络图片配置
+ (void)br_setImgUrl:(NSString *)urlAddress to:(UIImageView *)imgV;
+ (void)br_setImgUrl:(NSString *)urlAddress to:(UIImageView *)imgV defaultImg:(NSString *)defaultImg;


#pragma mark - 弹框提示 --
+ (void)br_default:(NSString *)title text:(NSString *)text succ:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;

+ (void)br_defaultText:(NSString *)text succ:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
/// 弹出全部
+ (void)br_ejectAllSucc:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
/// 是否锁定
+ (void)br_Lock:(BOOL)lock succ:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
/// 是否冻结
+ (void)br_freeze:(BOOL)state succ:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
/// 是否退款
+ (void)br_refund:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
/// 是否继续合作
+ (void)br_suspend:(BOOL)state succ:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
/// 是否
+ (void)br_suspendShop:(BOOL)state succ:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
+ (void)br_refresh:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
/// 弹出指定
+ (void)br_ejectSucc:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;
/// 恢复指定
+ (void)br_recoverSucc:(BRVoidBlock)succ cancel:(BRVoidBlock)cancel inView:(UIView * _Nullable)view;

@end

NS_ASSUME_NONNULL_END
